package com.fastloan.mgt.product.label.controller;

import com.fastloan.mgt.product.label.model.ProductLabel;
import com.fastloan.mgt.product.label.service.ProductLabelService;
import com.kawins.result.ResultTo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;

/**
 * @author chenkai
 * createTime 2017-12-2017/12/27 16:01
 */
@RestController
@RequestMapping("/api/web/productLabel")
public class ProductLabelController {

    @Autowired
    private ProductLabelService productLabelService;

    @PostMapping
    public ResultTo insertLabel(String productId, String labels) {
        productLabelService.insertProductLabel(productId, labels);
        return new ResultTo();
    }

    @PutMapping
    public ResultTo updateLabel(String productId, String labels) {
        productLabelService.updateProductLabel(productId, labels);
        return new ResultTo();
    }


}
